package com.dragon.repository.domain.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.dragon.repository.entity.ContractFit;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.dragon.common.util.BeanUtils;

import java.util.ArrayList;
import java.util.List;
import java.util.Date;


/**
 * @author sy
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ContractFitDTO {

    private static final long serialVersionUID = 1L;

    private Integer id;

    @ApiModelProperty(value = "乙方名称")
    private String partyBName;

    @ApiModelProperty(value = "默认送货负责人")
    private Integer deliverAdminId;

    @ApiModelProperty(value = "默认生产负责人")
    private Integer produceAdminId;

    @ApiModelProperty(value = "默认收款人")
    private Integer payeeAdminId;

    @ApiModelProperty(value = "乙方首字母")
    private String codeLetter;

    @ApiModelProperty(value = "电话")
    private String telephone;

    @ApiModelProperty(value = "联系人")
    private String firstcontacter;

    @ApiModelProperty(value = "传真")
    private String fax;

    @ApiModelProperty(value = "地址")
    private String address;

    @ApiModelProperty(value = "签订地点")
    private String signedAddress;

    @ApiModelProperty(value = "开户行")
    private String bankAddress;

    @ApiModelProperty(value = "银行卡账号")
    private String bankNum;

    @ApiModelProperty(value = "送货人名称")
    private String deliverUsername;

    @ApiModelProperty(value = "生产人名称")
    private String produceUsername;

    @ApiModelProperty(value = "收款人名称")
    private String payeeUsername;

    @ApiModelProperty(value = "法定代表人名称")
    private String legalRepresentName;


    public ContractFitDTO() {}

    public ContractFitDTO(ContractFit entity) {
        BeanUtils.copyProperties(entity,this);
    }

    public static ContractFitDTO convert(ContractFit entity) {
        return new ContractFitDTO(entity);
    }

    public static List<ContractFitDTO> convertList(List<ContractFit> list) {
        List<ContractFitDTO> resultList = new ArrayList<>();
        for (ContractFit entity : list) {
            resultList.add(new ContractFitDTO(entity));
        }
        return resultList;
    }}
